/**
 * Created by Admin on 30.12.2014.
 */

var AjaxQueue = (function ($) {

    return $.inherit(LoadingQueue, {
        __constructor: function (ajaxTasks, options) {
            var tasks = {};
            $.each(ajaxTasks, function (name, ajaxTask) {
                tasks[name] = {
                    execute: function (success, error) {
                        $.ajax({
                            url: ajaxTask.url,
                            success: success,
                            error: error
                        })
                    },

                    metaData: ajaxTask.metaData
                }
            });
            this.__base(tasks, options)
        }
    }, {})

})(window["jQuery"]);